import React, { Component } from 'react'
import './List.css'
import Item from './Item/Item'

export default class List extends Component {
  render() {
    const { todos, deleteTodo, checkTodo } = this.props
    return (
      <ul className="todo-main">
        {todos.map((v) => {
          return (
            <Item
              item={v}
              deleteTodo={deleteTodo}
              checkTodo={checkTodo}
              key={v.id}
            />
          )
        })}
      </ul>
    )
  }
}
